<?php
//imagenes
$images = '';
foreach ($imagenes as $img) {
    $images .= $imagesTpl;
    $images = str_replace('${id}', $img['id'], $images);
    $images = str_replace('${link}', $img['url'], $images);
    $images = str_replace('${src}', URL.'../content/slider/thumb/'.$img['src'], $images);
}
$html = str_replace('${imagenes}', $images, $html);
$html = str_replace('${imgprefix}', time() . '' . rand(1, 99999), $html);
$html = preg_replace('/\${*[A-Za-z0-9_]*\}*/', '', $html);
?>